package cn.cutie.clot.gateway.filter;

import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

/**
 * @Description:
 * @Author: Cutie
 * @CreateDate: 2024/6/5 13:34
 * @Version: 0.0.1
 */
@Component("demoFilter")
public class DemoFilter implements GatewayFilter{
    @Override
    public Mono<Void> filter(ServerWebExchange exchange) {
        System.out.println("===>>> filters: demoFilter");
        exchange.getRequest().getHeaders().toSingleValueMap().forEach((k, v) -> {
            System.out.println(k + ":" + v);
        });
        return Mono.empty();
    }
}
